{% extends "base.html" %}

{% block content %}
<div class="span-3 last block teaser">
	<h2>{{page.title}}</h2>
	<div class="bbody">
		{{page.body}}
	</div>
</div>

{% load blog %}
{% get_blog_list as blog_list limit 4 %}
<div id="blogs" class="span-3 clear">
	{% if blog_list %}
		{% for item in blog_list %}
		<div class="block last">
			{% include "blog/blogentry_entry.html" %}			
		</div>
		{% endfor %}
	{% else %}
	<p>no blog entries</p>
	{% endif %}
</div>
{% endblock %}

{% block sidebar %}

<div class="block feeds clear">
	<h2>Latest Feeds</h2>
	<div class="bbody">
		{% load humanize %}
		{% load aggregator %}
		{% get_feed_list as feed_list limit 8 %}
		{% if feed_list %}
			{% for item in feed_list %}
		<div class="item">
			<span class="feed"><a href="{{ BLOCKS_AGGREGATOR_URL }}{{ item.feed.id }}/">{{ item.feed.title }}</a></span><br />
			<span class="date">{{ item.date_modified|naturalday:"F j, Y" }} @ {{ item.date_modified|date:"H:i" }}</span><br />
			<a class="title" href="{{ BLOCKS_AGGREGATOR_URL }}{{ item.feed.id}}/{{ item.id }}/" target="_new">{{ item.title }}</a>
		</div>
			{% endfor %}
		{% else %}
		<p>no feeds</p>
		{% endif %}
	</div>
</div>
{% endblock %}